package com.cole.gx095.Repository;

import com.cole.gx095.entity.Correlation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CorrelationRepository extends JpaRepository<Correlation,Integer>, JpaSpecificationExecutor<Correlation> {
    @Query(value = "select * from correlation c where c.saleBillId=?1",nativeQuery = true)
    List<Correlation> findByBillId(Integer id);
    @Query(value = "select * from correlation c where c.saleContractId=?1",nativeQuery = true)
    List<Correlation> findByConId(Integer contractId);
}
